import request from "@/utils/request.js";
/**
 * 查询待审核的升阶数据
 
 * @param params
 */
export const getUnaudited = query => {
  return request({
    url: `/purchase/factoryCommissionLevelUpgrade/page/unaudited`,
    method: "get",
    params: query
  });
};
/**
 * 查询已审核的升阶数据
 
 * @param params
 */
export const getAudited = query => {
  return request({
    url: `/purchase/factoryCommissionLevelUpgrade/page/audited`,
    method: "get",
    params: query
  });
};

/**
 * 确认升阶
 * @param params
 */
export const upgradeRecordId = upgradeRecordId => {
  return request({
    url: `/purchase/factoryCommissionLevelUpgrade/confirm/${upgradeRecordId}`,
    method: "post"
  });
};

/**
 * 导出
 * @param params
 */
export const payDetailExport = query => {
  return request({
    url: `/purchase/factoryCommissionLevelUpgrade/payDetail/export/${query.upgradeRecordId}`,
    method: "get",
    params: query,
    responseType: "blob"
  });
};

/**
 * 租户结算记录
 
 * @param params
 */
export const settlementManagePage = query => {
  return request({
    url: `/purchase/dbo/tenant/settlementManage/page`,
    method: "get",
    params: query
  });
};
